package com.ypinkj.app.api;


import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ypinkj.app.entity.UResumeProgress;
import com.ypinkj.app.entity.UResumeValuation;
import com.ypinkj.app.mapper.UResumeValuationMapper;
import com.ypinkj.app.utils.resultutils.Result;
import com.ypinkj.app.utils.resultutils.ResultUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * <p>
 *  前端控制器
 *  自我评价
 * </p>
 *
 * @author LF
 * @since 2020-09-29
 */
//自我评价内容已合并到个人信息中，此处不提供接口
/*@Api(tags = "自我评价")
@RestController
@RequestMapping("/u-resume-valuation")
public class UResumeValuationController {

    @Autowired
    UResumeValuationMapper resumeValuationMapper;

    @ApiOperation(value = "保存")
    @PutMapping
    public Result save(@RequestBody UResumeValuation resumeValuation){
        return resumeValuationMapper.insert(resumeValuation)>0 ? ResultUtil.success(resumeValuation) : ResultUtil.errorMsg();
    }

    @ApiOperation(value = "列表")
    @GetMapping
    public Result getList(String userid){
        LambdaQueryWrapper<UResumeValuation> wrapper = new LambdaQueryWrapper<>();
        wrapper.eq(UResumeValuation::getUserid,userid);
        List<UResumeValuation> list = resumeValuationMapper.selectList(wrapper);
        return list.size()>0 ?ResultUtil.success(list) : ResultUtil.errorMsg();
    }
}*/
